<template>
    <view>
        <!-- pages/ucenter/watchwuliu.wxml -->
        <view class="wuliu">
            <image :src="info.logo" mode="aspectFill"></image>
            <view class="msg">
                <text>{{ info.expName }}</text>
                <text>快递单号:{{ info.number }}</text>
            </view>
        </view>
        <view class="wuliulist">
            <view v-for="(item, index) in info.list" :key="index">
                <image src="/static/dizhiww.png" mode="aspectFit"></image>

                <text>{{ item.time }}:{{ item.status }}</text>
            </view>
        </view>
    </view>
</template>

<script>
// pages/ucenter/watchwuliu.js
var app = getApp();
export default {
    data() {
        return {
            orderid: '',

            info: {
                logo: '',
                expName: '',
                number: '',
                list: []
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        this.setData({
            orderid: options.orderid
        });
        this.init();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        init() {
            var _this = this;

            app.globalData.authPost2(
                'app/center/getwuliu',
                {
                    orderid: this.orderid
                },
                function (res) {
                    if (res.code === 0) {
                        _this.setData({
                            info: res.data
                        });
                    }
                }
            );
        }
    }
};
</script>
<style lang="scss"> @import 'main.scss';
@import './watchwuliu.scss';
</style>
